package com.example.exam.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;



@Data
@SuppressWarnings("serial")
//资料表
public class Resource extends Model<Resource> {
    // 资料id
    @TableId(type = IdType.AUTO)
    private Integer id;
    //文件类型ID-外键
    private Integer typeId;
    // 资料名
    private String resourceName;
    //物理视频上存储的文件名称
    private String pathResourceName;
    //上传时间
    private Date createTime;
    //文件大小（单位MB：9.35MB)
    private Double resourceSize;
    //文件后缀：doc、pdf、等
    private String fileSuffix;
    //文件状态，0：私有；1：公共
    private Integer resourceState;
    //文件上传人
    private String upUser;
    //描述
    private String des;
    /**
     * 获取主键值
     *
     * @return 主键值
     */
   @Override
   public Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Resource{" +
                "id=" + id +
                ", typeId=" + typeId +
                ", resourceName='" + resourceName + '\'' +
                ", pathResourceName='" + pathResourceName + '\'' +
                ", createTime=" + createTime +
                ", resourceSize=" + resourceSize +
                ", fileSuffix='" + fileSuffix + '\'' +
                ", resourceState=" + resourceState +
                ", upUser='" + upUser + '\'' +
                ", des='" + des + '\'' +
                '}';
    }
}
